home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Startmenu Clear Logoff.xpl < prev    next >
Text File  |  1999-06-12  |  2KB  |  57 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="1"
  4. "UIPATH"="Appearance\Start menu\Clear"
  5. "NAME"="Clear Items on logoff"
  6. "VERSION"="1.3"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Clear all items on logoff"
  9. "DESCRIPTION 1"="If this option is activated, Windows will clear all "Recent" entries that are available in the start menu, as soon as you logoff."
  10. "AUTHOR"="Xteq Systems"
  11. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  12. "COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
  13. "COMMENT 2"=" "
  14. "COMMENT 3"="Thanks to Jon-Roar Selenius (jseleniu@online.no) for spotting the "Recent Documents always empty" bug."
  15.  
  16.  
  17. 'Declaration of some constants
  18. sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
  19.  
  20. 'Called when the Plugin is started
  21. SUB Plugin_Initialize
  22.  i=RegReadValue(sp&"ClearRecentDocsOnExit") 'Str!
  23.  if IsEmpty(i)=false then 
  24.     SetUIElement 1,true 
  25.  end if
  26.  
  27. END SUB
  28.  
  29. 'Called when the Plugin should validate the Data the user has entered
  30. SUB Plugin_CheckData(ElementIndex)
  31. END SUB
  32.  
  33. 'Called when the Plugin should apply the changes
  34. SUB Plugin_Apply(ElementIndex,ElementSubIndex)
  35.  s=sp & "ClearRecentDocsOnExit"
  36.  b=GetUIElement(1)
  37.  
  38.  if b=true then
  39.   Call RegWriteValue(s,"1",1)
  40.  else
  41.  
  42.   'Deactivating it by DELETING the value !
  43.   i=RegReadValue(s) 
  44.   if IsEmpty(i)=false then 
  45.      Call RegDeleteValue(s)
  46.   end if
  47.  
  48.  end if
  49.  
  50.  
  51.  Call Restart
  52. END SUB
  53.  
  54. 'Called when the Plugin is about to be removed from memory
  55. SUB Plugin_Terminate
  56. END SUB
  57.